const CracoLessPlugin = require('craco-less')

module.exports = {
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
  devServer: {
    proxy: {
      '/tencent': {
        target: 'https://view.inews.qq.com',
        changeOrigin: true,
        pathRewrite: {
          '^/tencent': ''
        }
      }
    }
  },
  babel: {
    "plugins": [
      ["@babel/plugin-proposal-decorators", { "legacy": true }]
    ]
  }
}
